'use strict';
const svgCaptcha = require('svg-captcha');
const Service = require('egg').Service;
class ToolsService extends Service {
// 验证码服务
  async captcha() {
    const captcha = svgCaptcha.create(
      {
        size: 5,
        fontSize: 50,
        width: 100,
        height:35,
        background: '#cc9966',
      });
    return captcha;
  }
}

module.exports = ToolsService;
